import xrRequest from '../index';
import { BASE_URL } from '../request/config';
import type { IUser } from './types';

enum UserAPI {
    UserList = '/user/list',
    addAUser = '/user/add',
    editAUser = '/user/add',
}

export function userListService(page:any){
    return  xrRequest.post<IUser>({
        url:BASE_URL+UserAPI.UserList,
        data:page
    })
} 

export function addAUserService(data:any){
    xrRequest.post({
        url:BASE_URL+UserAPI.UserList,
        data:data
    })
} 